package a3_stack;
/**
 * 测试MyStack
 */
public class TestStack {
    public static void main(String[] args) {

        MyStack<Integer> stack = new MyStack<>();
        //入栈
        stack.push(1);
        stack.push(2);
        stack.push(3);
        //[1, 2, 3] top
        System.out.println(stack);

        //出栈
        stack.pop();
        //[1, 2] top
        System.out.println(stack);

        //返回栈顶元素
        System.out.println(stack.peek());
    }
}
